package com.example.dto;

import com.example.model.dto.BaseDTO;
import com.example.model.dto.BaseDateDTO;
import com.example.validator.group.AddGroup;
import com.example.validator.group.DefaultGroup;
import com.example.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 菜品表
 *
 * @author yyyyjinying 1020066395@qq.com
 * @since 1.0-SNAPSHOT 2025-04-29
 */

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(description = "菜品信息表")
public class DishesDTO extends BaseDateDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "菜品id")
    private Long dishId;
    @Schema(description = "菜品名称")
    private String name;
    @Schema(description = "菜品描述")
    private String description;
    @Schema(description = "菜品价格")
    private BigDecimal price;
    @Schema(description = "菜品图片URL")
    private String imageUrl;
    @Schema(description = "菜品缩略图")
    private String thumbnailUrl;
    @Schema(description = "菜品是否在售")
    private Integer isActive;
    @Schema(description = "分类ID")
    private Long categoryId;
    @Schema(description = "分类名称")
    private String categoryName;
    @Schema(description = "菜单标签集合")
    @JsonSerialize(using = TagNameJsonSerializer.class)
    private  String tagNames;
    private Integer isDelete;
    @Schema(description = "菜单口味集合") // @JsonSerialize：json序列化注解，作用于getter()方法，将java对象序列化为json数据
    @JsonSerialize(using = TagNameJsonSerializer.class)
    private  String flavorValues;
    @Schema(description = "标签")
    private List<TagsDTO> tagLists;
    @Schema(description = "口味")
    private List<DishFlavorsDTO> flavorLists;
    private List<ImagesDTO> imageLists;
    private List<ImagesDTO> thumbnailLists;
    @Schema(description = "Sku列表")
    private List<SkusDTO> skuLists;
    @Schema(description = "物料列表")
    private List<RawMaterialsConfigDTO> materialLists;


}